package com.bgs.eat.operationType.mapper;

import com.bgs.eat.config.BaseMapper;
import com.bgs.eat.operationType.entity.OperationTypeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OperationTypeMapper extends BaseMapper<OperationTypeEntity> {

    /**
    * @Description 根据 pid获取 营业类目信息列表
    * @Author lzy
    * @Date 2022/10/17 14:04
    * @Return java.util.List<com.bgs.eat.operationType.entity.OperationTypeEntity>
    * @param pId
    */
    @Select("select * from operation_type where p_id = #{pId}")
    @Results({
            @Result(column = "type_name", property = "typeName")
    })
    List<OperationTypeEntity> getOperationListByPid(Integer pId);
}
